﻿// $Id: TypeMapperSettings.cs 68 2008-05-09 16:11:33Z nvivo $

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;

namespace DBLGen.Plugins.Batch
{
    public class TypeMapperSettings : PluginSettings
    {
        private TypeMapping _mapping;
        private bool _useNullables = true;
        private string _customAttribute;

        public TypeMapping Mapping
        {
            get
            {
                return _mapping;
            }
            set
            {
                _mapping = value;
            }
        }

        public bool UseNullables
        {
            get
            {
                return _useNullables;
            }
            set
            {
                _useNullables = value;
            }
        }

        public string CustomAttribute
        {
            get
            {
                return _customAttribute;
            }
            set
            {
                if (value == String.Empty)
                    _customAttribute = null;
                else
                    _customAttribute = value;
            }
        }

        public override PluginSettings Clone()
        {
            TypeMapperSettings settings = new TypeMapperSettings();
            
            settings._customAttribute = _customAttribute;
            settings._mapping = _mapping;
            settings._useNullables = _useNullables;

            return settings;
        }

        protected override NameValueCollection SaveSettings()
        {
            throw new NotImplementedException();
        }

        protected override void LoadSettings(NameValueCollection settings)
        {
            throw new NotImplementedException();
        }
    }
}
